Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: register stake to Babylon chain #105

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

samricotta
Copy link

No description provided.

Copy link
Contributor

@RafilxTenfen RafilxTenfen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few suggestions

### Babylon Configuration
```toml
[babylon]
Key = "btc-staker" # Your Babylon key name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to instruct user how to create this key?

Copy link

@maiquanghiep maiquanghiep Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the instructions can be found here: https://github.com/babylonlabs-io/btc-staker/blob/6d25cf181be58531fff2ed32d2b0625887b9ff6a/README.md#create-a-babylon-keyring-keyring-backend-test-with-funds. Can we somehow tell users that they need to use the key created in this step?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/babylonlabs-io/btc-staker?tab=readme-ov-file#3-btc-staker-installation - we link to this at the beginning, which specifies the account within the guide. Maybe I should mention the babylon account in the prerequisites as its seemingly not clear enough

Copy link
Member

@gitferry gitferry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general lgtm. Some high-level comments:

  1. We should be consistent with babylonlabs-io/babylon@f1ae78e where we use registration other than transition. So we need to change the tone a bit.
  2. We should stick with Phase-1 or Phase-2 other than phase-1 or phase-2

@samricotta samricotta marked this pull request as ready for review December 18, 2024 09:40
Copy link
Contributor

@RafilxTenfen RafilxTenfen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

docs/register-phase-1-stake.md Outdated Show resolved Hide resolved
docs/register-phase-1-stake.md Outdated Show resolved Hide resolved
docs/register-phase-1-stake.md Outdated Show resolved Hide resolved
docs/register-phase-1-stake.md Outdated Show resolved Hide resolved
docs/register-phase-1-stake.md Outdated Show resolved Hide resolved
docs/register-phase-1-stake.md Outdated Show resolved Hide resolved
docs/register-phase-1-stake.md Outdated Show resolved Hide resolved
docs/register-phase-1-stake.md Outdated Show resolved Hide resolved
docs/register-phase-1-stake.md Show resolved Hide resolved
docs/register-phase-1-stake.md Outdated Show resolved Hide resolved
@vitsalis vitsalis changed the title docs: transition stake to Phase-2 docs: register stake to Babylon chain Dec 20, 2024
docs/register-phase-1-stake.md Show resolved Hide resolved
docs/register-phase-1-stake.md Show resolved Hide resolved
docs/register-phase-1-stake.md Show resolved Hide resolved
docs/register-phase-1-stake.md Show resolved Hide resolved

> **⚡ Note**: While these parameters can be provided manually, the global
> parameters file provides an easier user experience. This guide is only for
> valid, confirmed Bitcoin staking transactions with valid `OP_RETURN` data. If
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> valid, confirmed Bitcoin staking transactions with valid `OP_RETURN` data. If
> valid Bitcoin staking transactions with well-formed `OP_RETURN` data that have received
> sufficient Bitcoin confirmations (e.g., 10 for testnet). If

docs/register-phase-1-stake.md Show resolved Hide resolved

Parameters:
- `global-parameters-file`: The path to the global parameters file.
- `your-phase1-tx-hash`: The original hash of your Bitcoin staking transaction.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `your-phase1-tx-hash`: The original hash of your Bitcoin staking transaction.
- `your-phase1-tx-hash`: The original hash of your Bitcoin staking transaction.
This will be used to retrieve the staking transaction from your wallet.

Parameters:
- `global-parameters-file`: The path to the global parameters file.
- `your-phase1-tx-hash`: The original hash of your Bitcoin staking transaction.
- `your-btc-address`: BTC address of the staker in hex.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hex? This is weird. Shouldn't it be the normal address?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--staker-address [btcStakerAddrHex] this is what is required in the cli

registration by checking your balance on the [Babylon Explorer](https://babylon-testnet.l2scan.co)
by searching for the `<babylon_btc_delegation_tx_hash>` value.

This will then give you details on your transaction, which includes the state
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The below states relate to the statuses maintained by stakerd. Above you refer to going to the Babylon explorer. Something is missing here I think. In general, I recommend that we check the status of the transaction by stakerd/stakercli commands instead of sending people to a 3rd party explorer.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So ive spoken to rafael, currently the btc staker only has the status of the delegation. The only way is that user needs to look for the tx in the babylond node and if the tx was success in the node then the btc delegation is verfied. This is why I added that we should use the explorer because we dont yet have a native way. But we will be making a query for it.

docs/register-phase-1-stake.md Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants